package com.unitd.base.module.api.service;

import com.unitd.base.module.api.mybatis.mapper.ApiOrderGoodsMapper;
import com.unitd.base.module.api.entity.OrderGoodsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ApiOrderGoodsService {
    @Autowired
    private ApiOrderGoodsMapper orderGoodsDao;


    public OrderGoodsVo queryObject(Integer id) {
        return orderGoodsDao.selectById(id);
    }


    public List<OrderGoodsVo> queryList(Map<String, Object> map) {
        return orderGoodsDao.selectByMap(map);
    }


    public int queryTotal(Map<String, Object> map) {
        return orderGoodsDao.queryTotal(map);
    }


    public void save(OrderGoodsVo order) {
        orderGoodsDao.insert(order);
    }


    public void update(OrderGoodsVo order) {
        orderGoodsDao.updateById(order);
    }


    public void delete(Integer id) {
        orderGoodsDao.deleteById(id);
    }
}
